/* Filename:    nhodGlobals.h
 * Author:      John Van Drasek
 * Date:        28 December 2006
 * Description: Header file for NHO server globals
 */


#ifndef _NHODGLOBALS_H
#define _NHODGLOBALS_H


//////////////
// Includes //
//////////////
#include <iostream>

#define ENOBUFS WSAENOBUFS // This define is needed to convert from BSD code

//////////////////////////////////////////////////////////////////////////////
// Globals specific to list.h!! but shared by entire programs
//  compiler BUG? http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg00606.html
//         TODO: This is not right! g++ is complaining:
//         - error: array bound is not an integer constant
//         when NAMESIZE is referred to by a global variable in a file, 
//         or, when it is part of a member variable declaration in a class
//         even when "extern int NAMESIZE;" etc. is included to the top of these
//         files.
#define NAMESIZE 20
#define PASSWORDSIZE 10
#define BUFSIZE 1024
//////////////////////////////////////////////////////////////////////////////


/////////////
// Globals //
/////////////

// Global defines
#define SERVERLOGINPORT 10000
#define SERVERCHATPORT 10001
#define CLIENTCHATPORT 10002
#define COMMANDSIZE 20
#define MAXBUF 10 * 1024
#define QUERYSIZE 1024
#define ADDRESSSIZE 16
#define BUFSIZE 80


// Global server variables
extern int sizeOfLoggedInUsersList;
extern struct pktList* loggedInUsersList;

// Global thread variables
//extern pthread_t tLoginServer;
//extern pthread_t tChatServer;
//extern pthread_attr_t tattr;

#endif
